package com.cxyd.modules.wms.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cxyd.common.dao.BaseDao;
import com.cxyd.modules.api.entity.StockDetailEntity;
import com.cxyd.modules.wms.entity.StockEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 库存信息
 *
 * @author g_Cycle gengruyi01@163.com
 * @since 1.0.0 2023-04-27
 */
@Mapper
public interface StockDao extends BaseDao<StockEntity> {
    List<StockDetailEntity> queryStockList(@Param("parameter") Map<String, Object> parameters);

    IPage<StockEntity> selectCheckStockList(IPage<StockEntity> page, @Param("ew") Wrapper<StockEntity> queryWrapper);

    void procStockFreeze(@Param("parameter") Map<String, Object> parameters);

    void procStockCheck(@Param("parameter") Map<String, Object> parameters);

    void procMergeCall(@Param("parameter") Map<String, Object> parameters);

    void procCheckAffirm(@Param("parameter") Map<String, Object> parameters);

    Long existStockByContId(Long id);

    BigDecimal getStockQtySumBySpu(String spuNo,String positionType,String stockType);

    String selectContLocate(String reelId);

    Double getStockVo(String contNo);

    Long getRestCount();
}